]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Early initialize all internal properties
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 21 Oct 2022 17:09:09 +0000 (19:09 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 28 Feb 2024 21:10:22 +0000 (22:10 +0100)
These may be used later by methods called by constructors, so ensure
that they're all defined early.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>

js/gdm/util.js

index 89ad54497e0674504e540d47f2d9b463a6330fe2..84eb1315ae74d082e841d9d19c47c72211c90bf9 100644 (file)
@@ -103,10 +103,22 @@ export class ShellUserVerifier extends Signals.EventEmitter {
         this._reauthOnly = params.reauthenticationOnly;
 
         this._client = client;
+        this._cancellable = null;
 
         this._defaultService = null;
         this._preemptingService = null;
 
+        this._messageQueue = [];
+        this._messageQueueTimeoutId = 0;
+
+        this._failCounter = 0;
+        this._unavailableServices = new Set();
+
+        this._credentialManagers = {};
+
+        this.reauthenticating = false;
+        this.smartcardDetected = false;
+
         this._settings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA});
         this._settings.connect('changed',
             this._updateDefaultService.bind(this));
@@ -131,15 +143,6 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             'smartcard-inserted', this._checkForSmartcard.bind(this),
             'smartcard-removed', this._checkForSmartcard.bind(this), this);
 
-        this._messageQueue = [];
-        this._messageQueueTimeoutId = 0;
-        this.reauthenticating = false;
-
-        this._failCounter = 0;
-        this._unavailableServices = new Set();
-
-        this._credentialManagers = {};
-
         this.addCredentialManager(OVirt.SERVICE_NAME, OVirt.getOVirtCredentialsManager());
         this.addCredentialManager(Vmware.SERVICE_NAME, Vmware.getVmwareCredentialsManager());
     }